<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>学校管理</title>
<link href="/widget/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"  type="text/css"/>
<link href="/widget/iconfont/iconfont.css" rel="stylesheet" />
 {cssjs}
<link href="/res/css/inside_page.css" rel="stylesheet"  type="text/css"/>
</head>

<body>
<div class="container-fluid larry-wrapper">
     <div class="row">
         <div class="col-xs-12 col-sm-12 col-md-12">
             <!--头部搜索-->
             <section class="panel panel-padding">
                    <form class="layui-form">
                        <div class="layui-form">
							<div class="layui-inline">
                                <div class="layui-input-inline">
                                    <select class="" dict="{dict}" id="dict" name="dict">
                                    	<option value='' childs=''>选择地区</option>
							        </select> 
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <select class="" period="{period}" id="period" name="period">
                                    	<option value=''>选择学段</option>
							        </select> 
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <select class="" mechanism="{mechanism}" id="mechanism" name="mechanism">
                                    	<option value=''>选择机构</option>
							        </select> 
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <select class="" ischeck="{ischeck}" id="ischeck" name="ischeck">
                                    	<option value="">审核情况</option>
										<option value="0">已审核</option>
										<option value="1">未审核</option>
							        </select> 
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input class="layui-input" id="sch_name" name="sch_name" value="{sch_name}" placeholder="学校名称">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <input type="button" lay-submit class="layui-btn" lay-filter="search" id="btn_search" value="查找"/>
                            </div>
                        </div>
                    </form>
            </section>

            <!--列表-->
                <section class="panel panel-padding">
                    <div class="group-button">
                        <button class="layui-btn layui-btn-small modal-iframe" id="btn_add">
                            <i class="iconfont">&#xe649;</i> 添加
                        </button>
                        <button class="layui-btn layui-btn-small layui-btn-danger ajax-all" id="btn_del">
                            <i class="iconfont">&#xe626;</i> 删除
                        </button>
                        <button class="layui-btn layui-btn-small layui-btn-warm ajax-all" id="btn_ref">
                            <i class="iconfont">&#xe62e;</i> 刷新
                        </button>
                    </div>
                    <div class="layui-form">
                        <table id="example" class="layui-table lay-even">
                            <thead>
                                <tr>
                                    <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check" lay-skin="primary"></th>
                                    <th width="60">序号</th>
                                    <th width="250">学校名称</th>
									<th width="100">学段</th>
									<th width="100">机构</th>
									<th width="100">机构类型</th>
									<th width="100">地区</th>
                                    <th width="80">状态</th>
                                    <th width="80">审核情况</th>
                                    <th width="200">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <!-- START school_list -->
                                <tr>
                                    <td>
                                    <input type="checkbox" name="checkbox" lay-skin="primary" value="{id}"/>
                                    </td>
                                    <td>{id}</td>
                                    <th>{sch_name}</th>
									<th class="period_id">{period}</th>
									<th>{mechanism_name}</th>
									<th>{mtype_name}</th>
									<th>{district}</th>
                                    <td><par_flg v1="{flag}"></par_flg></td>
                                    <td><par_isc v1="{ischeck}"></par_isc></td>
                                    <td>
                                    	<button class="layui-btn layui-btn-mini layui-btn-normal modal-iframe" data-opt="check" data-id="{id}">
                                            <i class="iconfont">&#xe605;</i>审核
                                        </button>
                                        <button class="layui-btn layui-btn-mini modal-iframe" data-opt="update" data-id="{id}">
                                            <i class="iconfont">&#xe653;</i>编辑
                                        </button>
                                        <button class="layui-btn layui-btn-mini layui-btn-danger ajax" data-opt="del"  data-id="{id}">
                                            <i class="iconfont">&#xe626;</i>删除
                                        </button></td>
                                    </td>
                                </tr>
                                <!-- END school_list -->
                            </tbody>
                        </table>
                    </div>

                    <div class="pagination" id="page">
                        {page}
                    </div>
                </section>
         </div>
     </div>
</div>
   {jsmodel}
   <script type="text/javascript">
        layui.use('system_school');
        $("par_flg").each(function(a,b){
            if($(b).attr("v1")==0)
            {
                $(b).text("启用");
            }else{
                $(b).text("禁用");
            }
        });
        $("par_isc").each(function(a,b){
            if($(b).attr("v1")==0)
            {
                $(b).html('<i class="iconfont">&#xe6a1;</i>');
            }else{
                $(b).html('<i class="iconfont">&#xe61d;</i>');
            }
        });
        
        $().ready(function(){
           $("#btn_search").bind("click",function(){   
                var period=$("#period").val();
                var dict=$("#dict option:checked").attr("childs");
                var mechanism=$("#mechanism").val();
                var ischeck=$("#ischeck").val();
                var sch_name=$("#sch_name").val();
                
                location.href="?t=system_school&period="+period+"&mechanism="+mechanism+"&dict="+dict+"&ischeck="+ischeck+"&sch_name="+sch_name;
            }); 
        });
        
    </script>
</body>
</html>
